<?php

/**
 * Created by PhpStorm.
 * User: IsSwm
 * Date: 2017/6/21
 * Time: 16:45
 */

namespace app\qiye\controller;


use think\Controller;

class QiYe extends Controller
{


    //小程序
    public function index($offset = 0, $pagesize = 4)
    {

        $sql = "SELECT * FROM w_qiye WHERE status='0' ORDER BY id DESC LIMIT {$offset}, {$pagesize}";
        $lists = db('qiye')->where('status', '0')->order('id', 'desc')->limit($offset, $pagesize)->select();
        if ($lists) {
            foreach ($lists as $k => $value) {
                $lists[$k]['content '] = strip_tags($value['content']);
                $lists[$k]['add_time'] = date('y-m-d', $value['add_time']);
            }
        }
        return $this->sucReturn($lists);
    }

}